package chapter15;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by lzy
 * Date: 2018/5/14
 */
public class ApplyTest {
    public static void main(String[] args) {
        List<Shape> shapes = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            shapes.add(new Shape());
        }
        try {
            Apply.apply(shapes,Shape.class.getMethod("rotate"));
        } catch (NoSuchMethodException e) {
            e.printStackTrace();
        }
    }
}
